﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Sisocana.Core.Models.SiteModel>" %>

    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/multiplemarkersmap.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".datePicker").datepicker({ dateFormat: 'dd/mm/yy' });
        }); 
    </script>    
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("button, input:submit , input:file , p a").button();
        });
    </script>


<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
           
        <%: Html.HiddenFor(model =>model.id) %>
        <%: Html.HiddenFor(model =>model.estado) %>
        <div id="containerCenter">
            <div id="leftCenter">
                <div class="editor-label">           
                    <%: Html.LabelFor(model => model.nombreCatastrofe, "Catastrophe Name")%>
                </div>
                <div class="editor-label">
                    <%: Html.TextBoxFor(model => model.nombreCatastrofe, new { rows = 1 })%>
                    <%: Html.ValidationMessageFor(model => model.nombreCatastrofe) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelFor(model => model.tituloWeb, "Site Title")%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.tituloWeb)%>
                    <%: Html.ValidationMessageFor(model => model.tituloWeb) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelFor(model => model.subtituloWeb, "Site Subtitle")%>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.subtituloWeb)%>
                    <%: Html.ValidationMessageFor(model => model.subtituloWeb) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelFor(model => model.descripcion, "Description") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(model => model.descripcion) %>
                    <%: Html.ValidationMessageFor(model => model.descripcion) %>
                </div>
            </div>
            <div id="rightCenter">
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.fecha, "Catastrophe Date")%>
                </div>

                <div class="editor-field">
                    <%: Html.EditorFor(model => model.fecha)%>
                    <%: Html.ValidationMessageFor(model => model.fecha) %>
                </div>
        
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.subdominio, "Subdomain") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(model => model.subdominio) %>
                    <%: Html.ValidationMessageFor(model => model.subdominio) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelFor(model => model.mensajeHeader, "Header Message") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(model => model.mensajeHeader)%>
                    <%: Html.ValidationMessageFor(model => model.mensajeHeader) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelFor(model => model.mensajeFooter, "Footer Message") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextAreaFor(model => model.mensajeFooter)%>
                    <%: Html.ValidationMessageFor(model => model.mensajeFooter) %>
                </div><br/> 
            </div>
        </div>
        <div>       
            <% Html.RenderAction("showSiteAdmin", "Site", new { siteId = Model.id }); %>
        </div>      
        <p>
            <input type="submit" value="Save changes" />
            <%= Html.ActionLink("Select and modify affected locations", "AffectedAreas", new { idSitio = Model.id }) %>
        </p>
    
<% } %>
